package com.sxbbc.common.core.enums;

import java.util.ArrayList;
import java.util.List;

import com.sxbbc.common.basics.utils.calculation.CalcuUtils;

/**
 * 
 * 位置枚举类
 * 每日必逛
 * 
 * @author Wahyee
 */
public enum PositionDailyEnums{
	UP_X(1,"上方横图",375,139),
	LEFT_Y(2,"左侧竖图",140,199),
	CENTER_X(3,"中间横图",203,75),
	RIGHT_DOWN_LEFT(4,"右下左图",101,123),
	RIGHT_DOWN_RIGHT(5,"右下右图",101,123);

	
	private Integer id;

	private String name;
	
	private Integer width;
	
	private Integer height;
	
	

	public Integer getWidth() {
		return width;
	}

	public void setWidth(Integer width) {
		this.width = width;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private PositionDailyEnums(Integer id, String name) {
		this.id = id;
		this.name = name;
	}
	
	private PositionDailyEnums(Integer id, String name, Integer width, Integer height) {
		this.id = id;
		this.name = name;
		this.width = width;
		this.height = height;
	}

	public static List<PositionDailyEnums> queryList() {
		List<PositionDailyEnums> list = new ArrayList<PositionDailyEnums>();
		for (PositionDailyEnums o : PositionDailyEnums.values()) {
			list.add(o);
		}
		return list;
	}

	public static String getName(Integer id) {
		String str = "";
		for (PositionDailyEnums o : PositionDailyEnums.values()) {
			if (CalcuUtils.getInstance().isEquals(id, o.getId())) {
				str = o.getName();
				break;
			}
		}
		return str;
	}
}
